const { IntentEventListener, IntentEventBUS, IntentEvent } = require("./IntentStack");
//创建BUS
let BuildEvent = new class BuildEvent extends IntentEvent{
    listener(event){
        if(event.getIntent().getAction() == 'build'){
            this.handleEvent(event);
        }
    }
}(IntentEventBUS);

let BuildEventBUS = new class BuildEventBus extends IntentEventListener{
    listener(event){
        if(event.getIntent().getAction() == 'build'){
            this.handleEvent(event);
        }
    }
}(IntentEventBUS);

let HarvestEventBUS = new class HarvestEventBUS extends IntentEventListener{
    listener(event){
        if(event.getIntent().getAction() == 'harvest'){
            this.handleEvent(event);
        }
    }
}(IntentEventBUS);

let TransferEventBUS = new class TransferEventBUS extends IntentEventListener{
    listener(event){
        if(event.getIntent().getAction() == 'transfer'){
            this.handleEvent(event);
        }
    }
}(IntentEventBUS);